package cmd

import (
	"fmt"
	"github.com/spf13/cobra"
	"my189go/internal/session"
)

var ucCmd = &cobra.Command{
	Use:    "uc",
	Short:  "use disk case file 1:true 0:false", // 是否缓存文件到本地？
	PreRun: session.Parse,
	Args:   cobra.MinimumNArgs(1),
	Run: func(cmd *cobra.Command, args []string) {
		err := App().UseDiskCase(args[0] == "/1")
		if err != nil {
			return
		}
		fmt.Println("设置成功")
	},
}
